# CPAN Name  : Term-ReadLine-Gnu
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: jason ryan <jasonwryan@gmail.com>
# Contributor: AUR Perl <aurperl@juster.info>
# Generator  : CPANPLUS::Dist::Arch 1.15

pkgname=perl-term-readline-gnu
pkgver=1.45
pkgrel=1
pkgdesc="GNU Readline XS library wrapper"
arch=('loong64' 'x86_64')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl>=5.7')
url='https://search.cpan.org/dist/Term-ReadLine-Gnu'
source=("https://search.cpan.org/CPAN/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-${pkgver}.tar.gz")
sha512sums=('a195b26609ce8b723edfa334e44260c0c246a8a33b781a0a7d4922ade38541fe5e5e7bdd162c81eb7190afcfcce6fc1595089d40ab7036d17ece794bc3ecb102')

build() {
   export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor"     \
      PERL_MB_OPT="--installdirs vendor" \
      MODULEBUILDRC=/dev/null

    cd "${srcdir}/Term-ReadLine-Gnu-$pkgver"
    /usr/bin/perl Makefile.PL
    make
}

check() {
  cd "${srcdir}/Term-ReadLine-Gnu-$pkgver"
  export PERL_MM_USE_DEFAULT=1 PERL5LIB="" TERM=xterm
    make test
}

package() {
  cd "${srcdir}/Term-ReadLine-Gnu-$pkgver"
  make pure_install PERL_INSTALL_ROOT="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
